package com.zhuiYun.project.api.commoditydetail.service;

import com.zhuiYun.project.api.commoditydetail.entity.UserHistory;
import com.zhuiYun.project.common.response.CommonResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @ClassName CommodityDetailService
 * @Description TODO 商品详情业务层接口
 * @Author 赵笛
 * @Date 2023/4/4 15:59
 **/

public interface CommodityDetailService {

    /**
     * @Author 赵笛
     * @Description TODO 根据id查询当前商品
     * @Date 2023/4/4 16:45
     * @Return com.zhuiYun.project.common.response.CommonResult
     * @param commodityId
     */
    CommonResult getCommodityById(Integer commodityId);

    /**
     * @Author 赵笛
     * @Description TODO 根据商品id查询当前商品规格
     * @Date 2023/4/5 8:59
     * @Return com.zhuiYun.project.common.response.CommonResult
     * @param commodityId
     */
    CommonResult getCommoditySpecById(Integer commodityId);
    /**
     * @Author 赵笛
     * @Description TODO getCommentByCommodityId
     * @Date 2023/4/5 12:46
     * @Return com.zhuiYun.project.common.response.CommonResult
     * @param commodityId
     */
    CommonResult getCommentByCommodityId(Integer commodityId);

    /**
    * @Description 根据商品ids获取商品信息列表
    * @Author lzy
    * @Date 2023/4/5 21:04
    * @Return com.zhuiYun.project.common.response.CommonResult
    * @param ids
    */
    CommonResult getCommodityListByIds(String ids);
    CommonResult getCommodDIYityListByIds(String ids);
    /**
     * @Author 赵笛
     * @Description TODO 根据用户id查询收货地址
     * @Date 2023/4/6 11:09
     * @Return com.zhuiYun.project.common.response.CommonResult
     * @param userId
     */
    CommonResult getAddressList(Integer userId);
    /**
     * @Author 赵笛
     * @Description TODO
     * @Date 2023/4/6 16:03
     * @Return com.zhuiYun.project.common.response.CommonResult
     * @param id
     */
    CommonResult getAddressById(Integer id);

    /**
     * @Author 赵笛
     * @Description TODO 根据用户id查询当前用户收藏的商品列表
     * @Date 2023/4/11 14:06
     * @Return com.zhuiYun.project.common.response.CommonResult
     * @param userId
     * @param commodityName
     */
    CommonResult getCommodityCollectionListByUserId(Integer userId, String commodityName);

    /**
     * @Author 赵笛
     * @Description TODO 保存用户浏览历史
     * @Date 2023/4/11 19:09
     * @Return com.zhuiYun.project.common.response.CommonResult
     * @param userHistory
     */
    CommonResult saveUserHistory(UserHistory userHistory);
    /**
     * @Author 赵笛
     * @Description TODO 根据当前用户查找浏览记录
     * @Date 2023/4/11 14:06
     * @Return com.zhuiYun.project.common.response.CommonResult
     * @param userId
     * @param itemType
     */
    CommonResult getUserHistoryByUserId(Integer userId, Integer itemType);
    /**
     * @Author 赵笛
     * @Description TODO 删除历史记录
     * @Date 2023/4/18 9:56
     * @Return com.zhuiYun.project.common.response.CommonResult
     * @param commodityId
     * @param userId
     * @param itemType
     */
    CommonResult deleteHistory(Integer commodityId, Integer userId, Integer itemType);
}
